package android.itv.modesevice;

import java.util.Hashtable;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class Channel implements KvmSerializable {

    private static final long serialVersionUID = 1L;
    public String category = "";
    public String descriptions = "";
    public String idChannel = "";
    public String linkLogo = "";
    public String linktv = "";
    public  String name = "";
    public Channel()
    {
	
    }
    public Channel(String categ, String desc, String idC,
	    String linkLoGo, String linkTV, String mname) {
	     category = categ;
	     descriptions = desc ;
	     idChannel = idC;
	     linkLogo = linkLoGo;
	     linktv = linkTV;
	     name = mname;
    }

    @Override
    public Object getProperty(int arg0) {
	switch (arg0) {
	case 0:
	    return category;
	case 1:
	    return descriptions;

	case 2:
	    return idChannel;
	case 3:
	    return linkLogo;
	case 4:
	    return linktv;
	case 5:
	    return name;
	}
	return null;
    }

    @Override
    public int getPropertyCount() {

	return 6;
    }

    @Override
    public void getPropertyInfo(int postion, Hashtable table, PropertyInfo info) {
	switch (postion) {
	case 0:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "category";
	    break;
	case 1:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "descriptions";

	    break;
	case 2:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "idChannel";

	    break;
	case 3:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "linkLogo";

	    break;
	case 4:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "linktv";

	    break;
	case 5:
	    info.type = PropertyInfo.STRING_CLASS;
	    info.name = "name";

	    break;
	}
    }

    @Override
    public void setProperty(int postion, Object oject) {
	switch (postion) {
	case 0:
	    category = oject.toString();
	case 1:
	    descriptions = oject.toString();

	case 2:
	    idChannel = oject.toString();
	case 3:
	    linkLogo = oject.toString();
	case 4:
	    linktv = oject.toString();
	case 5:
	    name = oject.toString();
	}
    }
}
